package com.team.appinfo.util;

import com.aliyun.oss.OSS;
import com.aliyun.oss.OSSClient;
import com.aliyun.oss.OSSClientBuilder;
import com.aliyun.oss.model.CannedAccessControlList;
import com.aliyun.oss.model.ObjectMetadata;
import com.aliyun.oss.model.PutObjectRequest;
import com.team.appinfo.entity.AppInfo;
import com.team.appinfo.entity.AppInfoConstant;
import com.team.appinfo.entity.AppInfoTiaoJian;
import com.team.appinfo.entity.SystemConstant;
import com.team.appinfo.mapper.AppInfoMapper;
import org.springframework.context.ApplicationContext;
import org.springframework.context.support.ClassPathXmlApplicationContext;

import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.util.List;

public class Test {

    public static void main(String[] args) {
//        ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
//        AppCategoryMapper appCategoryMapper = (AppCategoryMapper) ctx.getBean("appCategoryMapper");
//        List<AppCategory> appCategoryBySanji = appCategoryMapper.getAppCategoryBySanji(new Long(3));
//        appCategoryBySanji.forEach(s -> {
//            System.out.println(s.getCategoryname());
//        });
        ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
        AppInfoMapper AppInfo = (AppInfoMapper) ctx.getBean("appInfoMapper");
        AppInfoTiaoJian appInfoTiaoJian=new AppInfoTiaoJian();
        appInfoTiaoJian.setDevid(1l);

        List<AppInfoConstant> appinfoAll = AppInfo.getAppinfoAll(appInfoTiaoJian);
        appinfoAll.forEach(s->{
            System.out.println(s.getStatusName()+"--->"+s.getDownloads()+"--->"+s.getAPKName()+"--->"+s.getStatusName()+"--->"+s.getCategoryLevel2Name()+"-"+s.getCategoryLevel3Name()+"--->"+s.getDownloads());
        });

    }
}

//public class Test{
//    public static void main(String[] args) {
//
//        ApplicationContext ctx=new ClassPathXmlApplicationContext("applicationContext.xml");
//        AppInfoMapper AppInfo = (AppInfoMapper) ctx.getBean("appInfoMapper");
//        List<AppInfoConstant> adminAppInfo = AppInfo.getAdminAppInfo(new AppInfoTiaoJian());
//     adminAppInfo.forEach(s->{
//         System.out.println(s.getStatusName()+"--"+s.getCategoryLevel2Name()+"--"+s.getAPKName());
//     });
//
//
//    }
//}


